package com.urfresh.sp.flume.api;

import com.urfresh.sp.flume.dto.Res;
import com.urfresh.sp.flume.dto.v2.SysInfo;
import com.urfresh.sp.flume.dto.v3.DataInfos;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by urfresh.mark on 2016/11/15.
 * test git develop
 */
public interface AppClientAPI {

    @ApiOperation(value = "埋点信息数据，使用统一的数据格式上报", response = Res.class, notes = "rst=-1表示验证失败")
    Res info(
            @ApiParam(name = "数据类型，目前支持click和expose", required = true)
                    String type,
            @ApiParam(name = "app上报的点击埋点数据", required = true)
                    DataInfos dataInfos);

    @ApiOperation(value = "通过短信，push唤起app时的信息，需要包含track反馈的信息", response = Res.class, notes = "rst=-1表示验证失败")
    Res track(HttpServletRequest request, @ApiParam(name = "app启动时候的基础数据对象", required = true) SysInfo sysInfo);

    @ApiOperation(value = "用户登录时的上报信息，数据格式和app启动时的信息一致", response = Res.class, notes = "rst=-1表示验证失败")
    Res login(HttpServletRequest request, @ApiParam(name = "app启动时候的基础数据对象", required = true)
                    SysInfo sysInfo);

    @ApiOperation(value = "app启动时提交的埋点数据，包含app版本和手机设备数据等基础信息", response = Res.class, notes = "rst=-1表示验证失败")
    Res sysInfo(HttpServletRequest request, @ApiParam(name = "app启动时候的基础数据对象", required = true)
                               SysInfo sysInfo);
    
    
    @ApiOperation(value = "app启动时提交的埋点数据，支持自定义type字段", response = Res.class, notes = "rst=-1表示验证失败")
    Res info(HttpServletRequest request, String type,
             @ApiParam(name = "app启动时候的基础数据对象", required = true)
                        SysInfo sysInfo);
}
